import 'package:flutter/cupertino.dart';

extension FFWidgetExt on Widget {
  Widget get toSliverBox {
    return SliverToBoxAdapter(
      child: this,
    );
  }

  // 移除padding
  Widget toRemovePadding({
    required BuildContext context,
    bool removeTop = false,
    bool removeBottom = false,
    bool removeLeft = false,
    bool removeRight = false,
  }) {
    return MediaQuery.removePadding(
      context: context,
      removeTop: removeTop,
      removeBottom: removeBottom,
      removeLeft: removeLeft,
      removeRight: removeRight,
      child: this,
    );
  }
}
